<%-- 
    Document   : hearderweb
    Created on : Dec 1, 2011, 7:12:19 PM
    Author     : Tran Manh Linh
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<div id="header_top">
    <div id="header_logo"><a href="firstPage"><img src="images/logo.jpg" width="324" height="84" /></a></div>
    <div id="header_top_body"></div>
    <div id="header_top_search">
        <div style="height:30%;clear:both;">
            <ul>
                <c:if test="${user == null}">
                    <li><a href="dangKy">Register</a></li>
                </c:if>
                <c:choose>
                    <c:when test="${user == null}">
                        <li><a id="dnHayChua" href="#?w=500" rel="popup_name" class="poplight" >SignIn</a></li>
                    </c:when>
                    <c:otherwise>
                        <li><a id="dnHayChua" href="thongTinThanhVien"> ${user.tenDangNhap} ! </a></li>
                        <li><a href="dangXuat"> (logout)</a></li>
                        <li><a href="myPage">MyPage</a></li>
                    </c:otherwise>
                </c:choose>
                <li><a href="#"><img src="images/header_icon_facebook.png"/></a></li>
                <li><a href="#"><img src="images/header_icon_twitter2.png"/></a></li>
                <li><a href="#"><img src="images/soc-icon-youtube.png"/></a></li>
            </ul>
        </div>
        <div style="height:70; margin-top:10px; clear:both;float:left">
            <form id="frmSearch" name="frmSearch" method="post" action="danhSach?loaids=s">
                <label for="textfield"></label>
                <input type="text" name="tuKhoa" id="tuKhoa" size="30"/> 
                <input type="submit" name="btSearch" class="btSearch" id="btSearch" value=" Search " size="10"/>     
            </form>
        </div>
    </div>
</div>
<div id="header_center">
    <div id="menu_h">
        <ul>
            <li><a href="danhSach?loaids=pcs">Products Closing Soon</a></li>
            <li><a href="danhSach?loaids=mp">Most Popular</a></li>
            <li><a href="danhSach?loaids=dsp">Dollar Start Products</a></li>
            <li><a href="danhSach?loaids=na">New Arrivals</a></li>
        </ul>
    </div>
    <div id="header_center_right">
        <ul>
            <li><a href="#">How-To</a></li>
            <li><a href="help">  FAQ  </a></li> 
        </ul>
    </div>
</div>
<div id="header_footer">
    <ul id="nav">
        <li><a href="#">All Categories</a>
            <ul>
                <c:forEach items="${dayDanhMuc}" var="dsDanhMuc" varStatus="dayDanhMuc" begin="0" end="${dayDanhMuc.size()}" step="1">
                    <c:forEach items="${dsDanhMuc}" var="danhMuc" varStatus="dsDanhMuc" begin="0" end="${dsDanhMuc.size()}" step="1">
                        <li><a href="tungDanhMuc?maDanhMuc=${danhMuc.getMaDanhMuc()}">${danhMuc.getTenDanhMuc()}</a></li>
                    </c:forEach>
                </c:forEach>
            </ul>
        </li>

        <c:set var="i" scope="page" value="-1"/>
        <c:forEach items="${dsLoaiDanhMuc}" var="loaiDanhMuc" varStatus="dsLoaiDanhMuc" begin="0" end="${dsLoaiDanhMuc.size()}" step="1">
            <c:set var="i" scope="page" value="${i+1}"/>
            <li><a href="tungLoaiDanhMuc?maLoaiDanhMuc=${loaiDanhMuc.getMaLoaiDanhMuc()}">${loaiDanhMuc.getTenLoaiDanhMuc()}</a>
                <ul>
                    <c:set var="dsDanhMuc" scope="page" value="${dayDanhMuc.get(i)}"/>
                    <c:forEach items="${dsDanhMuc}" var="danhMuc" varStatus="dsDanhMuc" begin="0" end="${dsDanhMuc.size()}" step="1">
                        <li><a href="tungDanhMuc?maDanhMuc=${danhMuc.getMaDanhMuc()}">${danhMuc.getTenDanhMuc()}</a></li>
                    </c:forEach>
                </ul>
            </li>
        </c:forEach>
    </ul>	
</div>
        <div id="header_banner"><a href="chiTietSanPham?id=sp25"><img width="100%" height="100%" src="images/ibid_edit.jpg"></img></a>
</div>
